<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type">
    <meta charset="utf-8">
    <title>{{$data.title}} - 后台管理</title>
    <link href="{{$smarty.const.APP_URL}}templates/admin/css/admin.css" type="text/css" rel="stylesheet">
    <link href="{{$smarty.const.APP_URL}}templates/admin/js/artDialog/black.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/jquery.cookie.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/artDialog/jquery.artDialog.min.js"></script>
    <script type="text/javascript" src="{{$smarty.const.APP_URL}}templates/admin/js/admin.js"></script>
    <script type="text/javascript">
        var this_uri = "/order/purchase";
    </script>
</head>
<body>

<div id="header">
    <div class="logo"><a href="/"><img src="{{$smarty.const.APP_URL}}templates/admin/images/logo.png" title="后台首页"></a></div>
    <div class="loading"><div id="ajax-loader" title="Ajax数据更新中..."></div></div>
    <div id="topbar">
        <!--顶部菜单 start-->
        {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/topmenu.html"}}
        <!--顶部菜单 end-->
        <!--顶部右侧 start-->
        {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/topuser.html"}}
        <!--顶部右侧 end-->
        <div></div>
    </div>
</div>

<div><!-- 外层添加一个DIV解决IE8下margin-top的问题 -->
    <table id="maintable" cellpadding="0" cellspacing="0">
        <tbody><tr>
            <!--左侧菜单 start-->
            {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/leftmenu.html"}}
            <!--左侧菜单 end-->
            <!--主要TD start-->
            <td class="maintd" valign="top">
                <div class="maindiv">
                    <div id="main">
                        <div class="itemtitle">
                            <h3>编辑采购信息</h3>
                            <ul>
                                <a class="link-btn link-live" href="/order/purchase_edit">编辑采购信息</a>
                                <a class="link-btn" href="/order/purchase">采购列表</a>
                                <a class="link-btn" href="/order/purchase_add">添加采购信息</a>
                            </ul>
                        </div>
                        <form action="/order/purchase_edit_post" method="post" name="form1" enctype="multipart/form-data">
                            <input type="hidden" name="purchase_id" value="{{$purchase_info.purchase_id}}"/>
                            <table class="tb">
                                <tbody>
                                <tr>
                                    <td class="tbheader" colspan="38">编辑采购信息</td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>会员:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="member_id">
                                            {{foreach from=$member_list item=i}}
                                            <option value="{{$i.member_id}}" {{if $i.member_id==$purchase_info.member_id}}selected{{/if}}>{{$i.member_company}} {{$i.member_truename}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>货品类目:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="pc_id">
                                            {{foreach from=$cat_list item=i}}
                                            <option value="{{$i.pc_id}}" {{if $i.pc_id==$purchase_info.pc_id}}selected{{/if}}>{{$i.pc_name}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>品牌:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="brand_id">
                                            {{foreach from=$brand_list item=i}}
                                            <option value="{{$i.brand_id}}" {{if $i.brand_id==$purchase_info.brand_id}}selected{{/if}}>{{$i.brand_name}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>规格:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="spec_id">
                                            {{foreach from=$spec_list item=i}}
                                            <option value="{{$i.spec_id}}" {{if $i.spec_id==$purchase_info.spec_id}}selected{{/if}}>{{$i.spec_name}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            标题:
                                        </b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="80" value="{{$purchase_info.purchase_title}}" name="purchase_title" style="width: 789px;">
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>缩略图</b>
                                        <br>
                                        请上传货品缩略图
                                    </td>
                                    <td class="td last">
                                        <input type="file" name="purchase_image" style="width:292px;">&nbsp;&nbsp;<img src="{{$smarty.const.WWW_URL}}{{$purchase_info.purchase_image}}" width="50" height="50">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>凭证</b>
                                        <br>
                                        请上传凭证
                                    </td>
                                    <td class="td last">
                                        <input type="file" name="purchase_voucher" style="width:292px;">&nbsp;&nbsp;<img src="{{$smarty.const.WWW_URL}}{{$purchase_info.purchase_voucher}}" width="50" height="50">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>
                                            价格:
                                        </b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="30" value="{{$purchase_info.purchase_price}}" name="purchase_price">
                                        <font class="red">* 必填项 例：4000.00</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>计量单位:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="unit_id">
                                            {{foreach from=$unit_list item=i}}
                                            <option value="{{$i.unit_id}}" {{if $i.unit_id==$purchase_info.unit_id}}selected{{/if}}>{{$i.unit_name}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <!--<tr>
                                    <td class="td">
                                        <b>
                                            库存:
                                        </b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="30" value="{{$purchase_info.purchase_stock}}" name="purchase_stock">
                                        <font class="red">* 必填项 例:100</font>
                                    </td>
                                </tr>-->
                                <tr>
                                    <td class="td">
                                        <b>
                                            需求量:
                                        </b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="30" value="{{$purchase_info.purchase_num}}" name="purchase_num">
                                        <font class="red">* 必填项 例:1</font>
                                    </td>
                                </tr>
                                <!--<tr>
                                    <td class="td">
                                        <b>仓库:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="depot_id">
                                            {{foreach from=$depot_list item=i}}
                                            <option value="{{$i.depot_id}}" {{if $i.depot_id==$purchase_info.depot_id}}selected{{/if}}>{{$i.area_name}} {{$i.depot_name}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>发货时间:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="deliver_time_id">
                                            {{foreach from=$deliver_time_list item=i}}
                                            <option value="{{$i.dt_id}}" {{if $i.dt_id==$purchase_info.deliver_time_id}}selected{{/if}}>{{$i.dt_title}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>发货类型:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="deliver_type_id">
                                            {{foreach from=$deliver_type_list item=i}}
                                            <option value="{{$i.dt_id}}" {{if $i.dt_id==$purchase_info.deliver_type_id}}selected{{/if}}>{{$i.dt_title}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>物流方式:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="shipping_type_id">
                                            {{foreach from=$shipping_type_list item=i}}
                                            <option value="{{$i.st_id}}" {{if $i.st_id==$purchase_info.shipping_type_id}}selected{{/if}}>{{$i.st_title}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>-->
                                <tr>
                                    <td class="td">
                                        <b>描述:</b>
                                        <br>
                                        <span class="light">采购的描述.</span>
                                    </td>
                                    <td class="td last">
                                        <div class="ok_tab">
                                            <!--此处增加百度编辑器-->
                                            <textarea cols="50" rows="5"  id="editor" name="purchase_desc" style="width:800px;height:400px;">{{$purchase_info.purchase_desc}}</textarea>
                                        </div>
                                    </td>
                                </tr>
                                <!--<tr>
                                    <td class="td">
                                        <b>状态:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="purchase_state_id">
                                            {{foreach from=$purchase_state_list item=i}}
                                            <option value="{{$i.ps_id}}" {{if $i.ps_id==$purchase_info.purchase_state_id}}selected{{/if}}>{{$i.ps_name}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>跟进员:</b>
                                    </td>
                                    <td class="td last">
                                        <select name="admin_id">
                                            {{foreach from=$admin_list item=i}}
                                            <option value="{{$i.admin_id}}" {{if $i.admin_id==$purchase_info.admin_id}}selected{{/if}}>{{$i.admin_group_name}} {{$i.admin_name}}</option>
                                            {{/foreach}}
                                        </select>
                                        <font class="red">* 必填项</font>
                                    </td>
                                </tr>-->
                                <tr>
                                    <td class="td">
                                        <b>
                                            排序:
                                        </b>
                                    </td>
                                    <td class="td last">
                                        <input type="text" size="30" value="{{$purchase_info.purchase_sort}}" name="purchase_sort">
                                        <font class="light">排序 3位正整数 升序排序</font>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="td">
                                        <b>是否显示:</b>
                                    </td>
                                    <td class="td last">
                                        <input type="radio" value="1" name="purchase_show" {{if $purchase_info.purchase_show==1}}checked{{/if}}><b>是</b>
                                        <input type="radio" value="2" name="purchase_show" {{if $purchase_info.purchase_show==2}}checked{{/if}}><b>否</b>
                                        <span class="light">请选择.</span>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <div class="submit">
                                <input class="save" type="submit" value="提交" name="save">
                                <input class="cancel" type="reset" value="重置" name="save">
                            </div>
                        </form>
                        <!--底部信息 start-->
                        {{include file="{{$smarty.const.APP_PATH}}Admin/View/public/sysinfo.html"}}
                        <!--底部信息 end-->
                    </div>
                </div>
            </td>
            <!--主要TD end-->
        </tr>
        </tbody></table>
</div>

<script type="text/javascript">
    jQuery(document).ready(function() {
        //调整高度
        $("#container").height($(window).height()-40);
        $(window).resize(function() {
            $("#container").height($(window).height()-40);
        });

        App.init();//左侧菜单初始化

        var a101 = $("#topbar"); //顶部下接菜单
        a101.find("dl").Jdropdown({delay: 0}, function(a){});

    });
</script>
<!--百度编辑器-->
<script type="text/javascript" charset="utf-8" src="/data/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/data/ueditor/ueditor.all.min.js"> </script>
<!--百度编辑器配置-->
<script type="text/javascript">
    //实例化编辑器
    var ue = UE.getEditor('editor');
</script>
</body>
</html>